package com.earl.eatbao.service;

import com.earl.eatbao.commons.service.BaseService;
import com.earl.eatbao.domain.eatbao.Shop;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface ShopService extends BaseService<Shop, Long>{

	/**
	 * 商家上线，营业
	 * @param userId 商家账号id
	 */
	void shopOnline(Long userId);

	/**
	 * 商店下线，不营业
	 * 
	 * @param userId 商家账号id
	 */
	void shopOffline(Long userId);

	/**
	 * 搜索商店
	 * @param shopName
	 * @return
	 */
	List<Shop> searchShop(String shopName);

	/**
	 * 更新商店
	 * @param shop
	 * @return
	 */
	Boolean updateShop(Shop shop);

	/**
	 * 上传商品图片
	 * @param file
	 * @param shopId
	 * @return
	 */
    Boolean upLoadShopImage(MultipartFile file, Long shopId);

	/**
	 * 查询商家的所有商店
	 * @param businessId  商家Id
	 * @return
	 */
	List<Shop> findBusinessShop(long businessId);

    /**
     * 添加商店
     * @param shop
     * @param file
     * @return
     */
    Shop addShop(Shop shop, MultipartFile file);

	List<Shop> findOnlineShop();
}
